package com.tx.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Author: tcx
 * @description: 博客实体
 * @Date: 2019/11/5
 **/
public class Blog {

    private Integer bId;//博客id自增
    private String bTitle;//博客标题
    private String bContent;//博客内容
    private Integer tId;//博客类型
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date bCreateTime;//博客创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date bUpdateTime;//博客修改时间
    private Integer uId;//发表博客用户
    private Integer bCom;//博客评论数


    public Integer getbId() {
        return bId;
    }

    public void setbId(Integer bId) {
        this.bId = bId;
    }

    public String getbTitle() {
        return bTitle;
    }

    public void setbTitle(String bTitle) {
        this.bTitle = bTitle;
    }

    public String getbContent() {
        return bContent;
    }

    public void setbContent(String bContent) {
        this.bContent = bContent;
    }

    public Integer gettId() {
        return tId;
    }

    public void settId(Integer tId) {
        this.tId = tId;
    }

    public Date getbCreateTime() {
        return bCreateTime;
    }

    public void setbCreateTime(Date bCreateTime) {
        this.bCreateTime = bCreateTime;
    }

    public Date getbUpdateTime() {
        return bUpdateTime;
    }

    public void setbUpdateTime(Date bUpdateTime) {
        this.bUpdateTime = bUpdateTime;
    }

    public Integer getuId() {
        return uId;
    }

    public void setuId(Integer uId) {
        this.uId = uId;
    }

    private Type type;
    private User user;

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Integer getbCom() {
        return bCom;
    }

    public void setbCom(Integer bCom) {
        this.bCom = bCom;
    }


    @Override
    public String toString() {
        return "Blog{" +
                "bId=" + bId +
                ", bTitle='" + bTitle + '\'' +
                ", bContent='" + bContent + '\'' +
                ", tId=" + tId +
                ", bCreateTime=" + bCreateTime +
                ", bUpdateTime=" + bUpdateTime +
                ", uId=" + uId +
                ", bCom=" + bCom +
                ", type=" + type +
                ", user=" + user +
                '}';
    }
}
